/*
 * @Author: shuai
 * @Date: 2021-03-31 13:57:23
 * @LastEditors: shuai
 * @LastEditTime: 2021-03-31 14:10:07
 * @Description: file content
 */
import request from '@/utils/request'

export function login(data: { username: string; password: string }) {
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data,
  })
}

export function getInfo(token: string) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token },
  })
}

export function logout(token: string) {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post',
    data: { token },
  })
}
